export default({name,param = {}})=>{
	return new Promise((resolve, reject)=>{
		uni.showLoading({
			title: "加载中"
		})
		uniCloud.callFunction({
			name:name,
			data:param,
			success({result}) {
				if(result.code === 200){
					resolve(result.data)
	   			}else{
					uni.showToast({
						icon:"none",
						title:result.msg
					})
				}
			},
			fail(err) {
				reject(err)
			},
			complete() {
				uni.hideLoading()
			}
		})
	})
	
}